define(["knockout","durandal/app"], function(ko,app) {
	function SimpleItem (id) {
		this.text=ko.observable("当前项的id是"+id);
		var self =this;
		this.i=1;
		this.id=id;
		debugger;
		app.on("simpleItem:changeText").then(function (data) {
			self.text("我被 "+data+" 触发了,次数:"+(self.i++));
		})
	}
	SimpleItem.addMethod("change",function () {
		debugger;
		var self = this;
		app.trigger("simpleItem:changeText",self.id);
	});
	return SimpleItem
})